<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<div class="sidebar-background">
    <div class="primary-sidebar-background"></div>
</div>
<div class="primary-sidebar">
    <!-- Main nav -->
    <ul id="mainNavigation" class="nav nav-list">
        <li class="active">
            <!-- <span class="glow"></span> -->
            <a href="${pageContext.request.contextPath}/main">
                <i class="icon-home icon-2x"></i>
                <span>主页</span>
            </a>
        </li>
        
        <c:if test="${sessionScope.validUrls.contains('/EtlXml/list')}">
	        <li class="">
	        	<a href="${pageContext.request.contextPath}/EtlXml/list">
	            	&nbsp;<i class="fa fa-file-excel-o fa-2x"></i>
	                &nbsp;<span>作业管理</span>
	        	</a>
	        </li>
        </c:if>
        
        <c:if test="${sessionScope.validUrls.contains('/cronJob/list')}">
	        <li class="">
	        	<a href="${pageContext.request.contextPath}/cronJob/list?page=1">
	            	<i class="icon-calendar icon-2x"></i>
	            	<span>计划任务</span>
	            </a>
	        </li>
        </c:if>
         
        <c:if test="${sessionScope.validUrls.contains('/log/list/num')}">
	        <li class="">
	        	<a href="${pageContext.request.contextPath}/log/list/1">
	        		<i class="icon-chevron-right icon-2x"></i>
	        		<span>执行日志</span>
	        	</a>
	        </li>
        </c:if>
        
        <li class="dark-nav">
            <!-- <span class="glow"></span> -->
            <a class="accordion-toggle" data-toggle="collapse" href="#toolList">
                <i class="fa fa-magic fa-2x"></i> 
                <span>&nbsp;&nbsp;工具
                    <i class="icon-caret-down"></i>
                </span>
            </a>
            
            <ul id="toolList" class="collapse in" style="list-style:none;margin-left:20px;">
	            <li class="">
	                <a href="${pageContext.request.contextPath}/encryptSQL/make">
	                    <i class="fa fa-lock" style="font-size:16px;"></i>
	                    <span>&nbsp;加密SQL制作</span>
	                </a>
	            </li>
	            <li class="">
	                <a href="${pageContext.request.contextPath}/encryptSQL/sqlExecutor">
	                    <i class="fa fa-play" style="font-size:16px;"></i>
	                    <span>&nbsp;SQL执行</span>
	                </a>
	            </li>
            </ul>
        </li>
         
        <li class="dark-nav">
            <!-- <span class="glow"></span> -->
            <a class="accordion-toggle" data-toggle="collapse" href="#jobList">
                <i class="icon-cogs icon-2x"></i>
                <span>配置管理
                    <i class="icon-caret-down"></i>
                </span>
            </a>
            <ul id="jobList" class="collapse in" style="list-style:none;margin-left:20px;">
            
            	<c:if test="${sessionScope.validUrls.contains('/connection/list')}">
	                <li class="">
	                    <a href="${pageContext.request.contextPath}/connection/list">
	                        <i class="icon-leaf"></i>
	                        <span>数据源管理</span>
	                    </a>
	                </li>
                </c:if>
                
                <%-- 
                <c:if test="${sessionScope.validUrls.contains('/drivers/list')}">
	                <li class="">
	                    <a href="${pageContext.request.contextPath}/drivers/list">
	                        <i class="icon-bookmark"></i>
	                        <span>驱动管理</span>
	                    </a>
	                </li>
                </c:if> 
                --%>
                
                <c:if test="${sessionScope.validUrls.contains('/parameter/glist')}">
	                <li class="">
	                    <a href="${pageContext.request.contextPath}/parameter/glist">
	                        &nbsp;<i class="fa fa-book fa-lg"></i>
	                        &nbsp;<span>全局参数管理</span>
	                    </a>
	                </li>
                </c:if>
                
                <%-- 
                <c:if test="${sessionScope.validUrls.contains('/queue/list')}">
	                <li class="">
	                    <a href="${pageContext.request.contextPath}/queue/list">
	                        <i class="icon-time"></i>
	                        <span>等待队列</span>
	                    </a>
	                </li>
                </c:if> 
                --%>
                
                <c:if test="${sessionScope.validUrls.contains('/layer/list')}">
	                <li class="">
	                    <a href="${pageContext.request.contextPath}/layer/list">
	                        <i class="icon-align-left"></i>
	                        <span>层级管理</span>
	                    </a>
	                </li>
                </c:if>
                
                <c:if test="${sessionScope.validUrls.contains('/user/list/num')}">
	                <li class="">
			            <a href="${pageContext.request.contextPath}/user/list/1">
			                <i class="icon-user"></i>
			                <span>用户管理</span>
			            </a>
			        </li>
		        </c:if>
		        
		        <c:if test="${sessionScope.validUrls.contains('/role/list')}">
			        <li class="">
			            <a href="${pageContext.request.contextPath}/role/list">
			                <i class="fa fa-users"></i>
			                &nbsp;<span>角色管理</span>
			            </a>
			        </li>
		        </c:if>
            </ul>
        </li>

        <li class="">
            <!-- <span class="glow"></span> -->
            <a data-toggle="modal" href="#modal-logout">
                <i class="icon-signout icon-2x"></i>
                <span>退出</span>
            </a>
        </li>
        <script type="text/javascript">
            $(document).ready(function () {
                $('#logoutButton').click(function () {
                    window.location.replace("${pageContext.request.contextPath}/logout");
                });
            });
        </script>
    </ul>
    
</div>
